<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h1>大括号表达式</h1>
    <p>{{msg}}</p>
    <p>{{msg.toUpperCase()}}</p>
    <p v-text="msg"></p>
    <p v-html="msg"></p>

    <h1>2.指令一：强制数据绑定</h1>
    <img src="imgUrl">
    <img v-bind:src="imgUrl">
    <img :src="imgUrl">

    <h1>3.指令二：绑定监听事件</h1>
    <button v-on:click="test">test1</button>
    <button @click="test2(msg)">test2</button>
</div>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript">
    new Vue({
        el:'#app',
        data:{
            // mag;'Hello World'
            msg:'<a href="http:https://www.baidu.com/">Hello Wrold!</a>',
            imgUrl:'https://cn.vuejs.org/images/logo.png'
        },
        methods:{
            test(){
                alert('Hi！')
            },
            test2(content){
                alert(content)
            }
        }
    })
</script>
</body>
</html>